Optimal. Leaf size=61 \[ \frac {2 b c x}{3}-\frac {1}{3} b c^{3/2} \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )-\frac {1}{3} b c^{3/2} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {6037, 199, 327,
218, 212, 209} \begin {gather*} \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )-\frac {1}{3} b c^{3/2} \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )-\frac {1}{3} b c^{3/2} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right )+\frac {2 b c x}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 199
Rule 209
Rule 212
Rule 218
Rule 327
Rule 6037
Rubi steps
\begin {align*} \int x^2 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )+\frac {1}{3} (2 b c) \int \frac {1}{1-\frac {c^2}{x^4}} \, dx\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )+\frac {1}{3} (2 b c) \int \frac {x^4}{-c^2+x^4} \, dx\\ &=\frac {2 b c x}{3}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )+\frac {1}{3} \left (2 b c^3\right ) \int \frac {1}{-c^2+x^4} \, dx\\ &=\frac {2 b c x}{3}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )-\frac {1}{3} \left (b c^2\right ) \int \frac {1}{c-x^2} \, dx-\frac {1}{3} \left (b c^2\right ) \int \frac {1}{c+x^2} \, dx\\ &=\frac {2 b c x}{3}-\frac {1}{3} b c^{3/2} \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right )-\frac {1}{3} b c^{3/2} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 86, normalized size = 1.41 \begin {gather*} \frac {2 b c x}{3}+\frac {a x^3}{3}-\frac {1}{3} b c^{3/2} \text {ArcTan}\left (\frac {x}{\sqrt {c}}\right )+\frac {1}{3} b x^3 \tanh ^{-1}\left (\frac {c}{x^2}\right )+\frac {1}{6} b c^{3/2} \log \left (\sqrt {c}-x\right )-\frac {1}{6} b c^{3/2} \log \left (\sqrt {c}+x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 53, normalized size = 0.87
method | result | size |
derivativedivides | \(\frac {x^{3} a}{3}+\frac {x^{3} b \arctanh \left (\frac {c}{x^{2}}\right )}{3}+\frac {2 b c x}{3}+\frac {b \,c^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c}}{x}\right )}{3}-\frac {b \,c^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {c}}{x}\right )}{3}\) | \(53\) |
default | \(\frac {x^{3} a}{3}+\frac {x^{3} b \arctanh \left (\frac {c}{x^{2}}\right )}{3}+\frac {2 b c x}{3}+\frac {b \,c^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c}}{x}\right )}{3}-\frac {b \,c^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {c}}{x}\right )}{3}\) | \(53\) |
risch | \(\frac {x^{3} b \ln \left (x^{2}+c \right )}{6}-\frac {x^{3} b \ln \left (-x^{2}+c \right )}{6}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (-x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{2}}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{6}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{3}}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (i \left (x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{2}+c \right )}{x^{2}}\right )^{2}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{3}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (i \left (-x^{2}+c \right )\right ) \mathrm {csgn}\left (\frac {i \left (-x^{2}+c \right )}{x^{2}}\right )^{2}}{12}-\frac {i \pi b \,x^{3}}{6}+\frac {x^{3} a}{3}+\frac {2 b c x}{3}+\frac {c \sqrt {-c}\, b \ln \left (\sqrt {-c}\, c -c x \right )}{6}-\frac {c \sqrt {-c}\, b \ln \left (-\sqrt {-c}\, c -c x \right )}{6}+\frac {c^{\frac {3}{2}} b \ln \left (c^{\frac {3}{2}}-c x \right )}{6}-\frac {c^{\frac {3}{2}} b \ln \left (-c^{\frac {3}{2}}-c x \right )}{6}\) | \(396\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 61, normalized size = 1.00 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (\frac {c}{x^{2}}\right ) - {\left (2 \, \sqrt {c} \arctan \left (\frac {x}{\sqrt {c}}\right ) - \sqrt {c} \log \left (\frac {x - \sqrt {c}}{x + \sqrt {c}}\right ) - 4 \, x\right )} c\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 162, normalized size = 2.66 \begin {gather*} \left [\frac {1}{6} \, b x^{3} \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + \frac {1}{3} \, a x^{3} - \frac {1}{3} \, b c^{\frac {3}{2}} \arctan \left (\frac {x}{\sqrt {c}}\right ) + \frac {1}{6} \, b c^{\frac {3}{2}} \log \left (\frac {x^{2} - 2 \, \sqrt {c} x + c}{x^{2} - c}\right ) + \frac {2}{3} \, b c x, \frac {1}{6} \, b x^{3} \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + \frac {1}{3} \, a x^{3} + \frac {1}{3} \, b \sqrt {-c} c \arctan \left (\frac {\sqrt {-c} x}{c}\right ) + \frac {1}{6} \, b \sqrt {-c} c \log \left (\frac {x^{2} - 2 \, \sqrt {-c} x - c}{x^{2} + c}\right ) + \frac {2}{3} \, b c x\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 830 vs.
\(2 (56) = 112\).
time = 2.84, size = 830, normalized size = 13.61 \begin {gather*} \begin {cases} \frac {a x^{3}}{3} & \text {for}\: c = 0 \\\frac {x^{3} \left (a - \infty b\right )}{3} & \text {for}\: c = - x^{2} \\\frac {x^{3} \left (a + \infty b\right )}{3} & \text {for}\: c = x^{2} \\- \frac {2 a c^{2} x^{3} \sqrt {- c}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {2 a x^{7} \sqrt {- c}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {2 b c^{\frac {7}{2}} \sqrt {- c} \log {\left (- \sqrt {c} + x \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {b c^{\frac {7}{2}} \sqrt {- c} \log {\left (x - \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {b c^{\frac {7}{2}} \sqrt {- c} \log {\left (x + \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {2 b c^{\frac {7}{2}} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {2 b c^{\frac {3}{2}} x^{4} \sqrt {- c} \log {\left (- \sqrt {c} + x \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {b c^{\frac {3}{2}} x^{4} \sqrt {- c} \log {\left (x - \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {b c^{\frac {3}{2}} x^{4} \sqrt {- c} \log {\left (x + \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {2 b c^{\frac {3}{2}} x^{4} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {b c^{4} \log {\left (x - \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {b c^{4} \log {\left (x + \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {4 b c^{3} x \sqrt {- c}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {b c^{2} x^{4} \log {\left (x - \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {b c^{2} x^{4} \log {\left (x + \sqrt {- c} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} - \frac {2 b c^{2} x^{3} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {4 b c x^{5} \sqrt {- c}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} + \frac {2 b x^{7} \sqrt {- c} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 6 c^{2} \sqrt {- c} + 6 x^{4} \sqrt {- c}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 69, normalized size = 1.13 \begin {gather*} \frac {1}{3} \, b c^{3} {\left (\frac {\arctan \left (\frac {x}{\sqrt {-c}}\right )}{\sqrt {-c} c} - \frac {\arctan \left (\frac {x}{\sqrt {c}}\right )}{c^{\frac {3}{2}}}\right )} + \frac {1}{6} \, b x^{3} \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + \frac {1}{3} \, a x^{3} + \frac {2}{3} \, b c x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 65, normalized size = 1.07 \begin {gather*} \frac {a\,x^3}{3}-\frac {b\,c^{3/2}\,\mathrm {atan}\left (\frac {x}{\sqrt {c}}\right )}{3}+\frac {2\,b\,c\,x}{3}+\frac {b\,x^3\,\ln \left (x^2+c\right )}{6}-\frac {b\,x^3\,\ln \left (x^2-c\right )}{6}+\frac {b\,c^{3/2}\,\mathrm {atan}\left (\frac {x\,1{}\mathrm {i}}{\sqrt {c}}\right )\,1{}\mathrm {i}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________